Skip to content

test(replay): [Data Collection 16] Keep Replay independent - #5832

Draft
adinauer wants to merge 8 commits into
fix/data-collection-device-info-optionsfrom
feat/data-collection-session-replay-network-options
Draft

test(replay): [Data Collection 16] Keep Replay independent#5832
adinauer wants to merge 8 commits into
fix/data-collection-device-info-optionsfrom
feat/data-collection-session-replay-network-options

Conversation

@adinauer

@adinauer adinauer commented Jul 24, 2026

Copy link
Copy Markdown
Member

PR Stack (Data Collection)


📜 Description

Keep Session Replay network privacy settings independent from Data Collection.

Add regression coverage proving that restrictive Data Collection body and header settings do not affect explicitly enabled Replay network details. Replay continues to use its existing URL allow/deny lists, body capture option, and request/response header allow lists.

💡 Motivation and Context

sendDefaultPii has no effect on Session Replay today. Wiring Data Collection into Replay would introduce new behavior and combine controls with opposing defaults: Replay network details are opt-in through URL allow lists, while Data Collection uses its own defaults for supported integrations.

Keeping the features independent avoids privacy-sensitive behavior changes for existing Replay users. The Data Collection documentation will call out that Replay remains governed by Replay-specific options.

Refs #5666

💚 How did you test it?

  • ./gradlew :sentry-okhttp:test --tests='io.sentry.okhttp.SentryOkHttpInterceptorTest'
  • ./gradlew spotlessApply apiDump
  • git diff --check

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Document that Session Replay is not controlled by Data Collection and continues to use Replay-specific privacy options.

#skip-changelog

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

Let nullable Session Replay network options inherit matching Data Collection settings while preserving historical Replay defaults when Data Collection is absent. Keep explicit Replay options authoritative and apply the effective policies to OkHttp network details.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread sentry/src/main/java/io/sentry/rrweb/RRWebOptionsEvent.java Outdated
@sentry

sentry Bot commented Jul 24, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.48.0 (1) release

⚙️ sentry-android Build Distribution Settings

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 316.96 ms 356.40 ms 39.44 ms
Size 0 B 0 B 0 B

Baseline results on branch: fix/data-collection-device-info-options

Startup times

Revision Plain With Sentry Diff
877594c 316.56 ms 375.38 ms 58.82 ms
f878386 318.79 ms 364.81 ms 46.02 ms

App size

Revision Plain With Sentry Diff
877594c 0 B 0 B 0 B
f878386 0 B 0 B 0 B

Previous results on branch: feat/data-collection-session-replay-network-options

Startup times

Revision Plain With Sentry Diff
1d4f70d 365.04 ms 441.86 ms 76.81 ms

App size

Revision Plain With Sentry Diff
1d4f70d 0 B 0 B 0 B

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

adinauer and others added 3 commits August 27, 2026 14:54
Restore Session Replay network privacy settings as the only controls for
Replay data. Data Collection and sendDefaultPii do not affect Replay, which
avoids changing behavior for existing Replay users.

Add coverage that restrictive Data Collection settings leave explicitly
enabled Replay network details unchanged.

Refs #5666
Co-Authored-By: Claude <noreply@anthropic.com>
@adinauer adinauer changed the title feat(replay): [Data Collection 16] Inherit network collection policy test(replay): [Data Collection 16] Keep Replay independent Aug 28, 2026
@adinauer

Copy link
Copy Markdown
Member Author

After checking with other teams, we're aligning with JS SDK which is currently not applying Data Collection options to Session Replay. Similar to JS SDK, sendDefaultPii currently also does not affect Session Replay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant